package com.fengye.middleware.rabbitmq.spring.event.controller;

import com.fengye.middleware.rabbitmq.spring.event.demo.LoginEventPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author sky
 * @date 2021年06月09日 10:23 上午
 */
@RestController
public class UserController {

    @Autowired
    private LoginEventPublisher loginEventPublisher;

    @GetMapping("/login")
    public void login(@RequestParam String username){
        loginEventPublisher.sendMsg(username);
    }
}
